Techniques for controlling recycling of blocks of memory

ABSTRACT

The present disclosure relates to examples of controlling recycling of blocks of memory. In one example implementation according to aspects of the present disclosure, a method comprises allocating at least one block of memory selected from a subset of blocks to be written in accordance with an equalizing technique to equalize a variation between blocks of memory based on at least one factor. The method further comprises resupplying the subset of blocks.

RELATED APPLICATIONS

The present application is a continuation of U.S. Non-Provisional application Ser. No. 15/343,576, filed Nov. 4, 2016, which is a continuation of U.S. Non-Provisional application Ser. No. 15/138,064, filed Apr. 25, 2016, which is a continuation of U.S. Non-Provisional application Ser. No. 14/862,195, filed Sep. 23, 2015, now U.S. Pat. No. 9,323,666, issued Apr. 26, 2016, which is a continuation of U.S. Non-Provisional application Ser. No. 14/247,399, filed Apr. 8, 2014, now U.S. Pat. No. 9,165,682, issued Oct. 20, 2015, which is a continuation of U.S. Non-Provisional application Ser. No. 13/962,779, filed Aug. 8, 2013, now U.S. Pat. No. 8,699,287, issued Apr. 15, 2014, which is a continuation of U.S. Non-Provisional application Ser. No. 13/572,257, filed Aug. 10, 2012, now U.S. Pat. No. 8,531,900, issued Sep. 10, 2013, which is a continuation of U.S. Non-Provisional application Ser. No. 13/042,242, filed Mar. 7, 2011, now U.S. Pat. No. 8,339,881, issued Dec. 25, 2012, which is a continuation of U.S. Non-Provisional application Ser. No. 11/942,631, filed Nov. 19, 2007, now U.S. Pat. No. 7,903,486, issued Mar. 8, 2011, wherein all the foregoing applications are incorporated by reference in their entirety for all purposes.

FIELD OF THE INVENTION

The present invention relates to memory, and more particularly to memory having a finite lifetime.

BACKGROUND

Memory is one of the most limiting aspects of performance of modem enterprise computing systems. One limiting aspect of memory is the fact that many types of memory exhibit a limited lifetime. For example, a lifetime of non-volatile memory such as flash is reduced each time it is erased and re-written. Over time and thousands of erasures and re-writes, such flash memory may become less and less reliable.

One common prior art technique for reducing the reduction of memory lifetime is wear leveling. Wear leveling allows for blocks within a storage device to be erased and written a roughly equal number of times. This avoids situations where one block is more frequently used, reaches an end of life, and must stop being used. This reduces the storage capacity of the entire device. Although the storage devices may have spare blocks, the spare blocks are exhausted and a memory capacity of device drops such that the storage device may not be used.

Memory vendors often guarantee a life expectancy of a certain percentage of memory. For example, a flash memory vendor may guarantee that after 100,000 program and erase cycles (i.e. endurance), less than 1% of blocks will be unusable based on exceeding error correction requirements. In this case, the error correction requirements may be set to correct a single bit error per 512 bytes for the flash device. Some recently developed devices have a much lower endurance. These devices require a much larger error correction requirement.

Furthermore, the lifetimes of memory blocks may vary. Consequently, using wear leveling, where a number of program erase cycles are leveled, a storage device may reach an end of life when only a specified percentage blocks are bad (1% for example). However, most blocks included in the storage device may still be functional.

There is thus a need for addressing these and/or other issues associated with the prior art.

SUMMARY

A system, method, and computer program product are provided for increasing a lifetime of a plurality of blocks of memory. In operation, at least one factor that affects a lifetime of a plurality of blocks of memory is identified. Additionally, the plurality of blocks to write is selected, based on the at least one factor.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a method for increasing a lifetime of a plurality of blocks of memory, in accordance with one embodiment.

FIG. 2 shows a technique for increasing a lifetime of a plurality of blocks of memory, in accordance with another embodiment.

FIG. 3 shows a method for increasing a lifetime of a plurality of blocks of memory, in accordance with another embodiment.

FIG. 4 shows a method for writing data to different storage devices based on a write frequency, in accordance with one embodiment.

FIG. 5 illustrates an exemplary system in which the various architecture and/or functionality of the various previous embodiments may be implemented.

DETAILED DESCRIPTION

FIG. 1 shows a method 100 for increasing a lifetime of a plurality of blocks of memory, in accordance with one embodiment. As shown, at least one factor that affects a lifetime of a plurality of blocks of memory is identified. See operation 102. Additionally, the plurality of blocks to write is selected, based on the at least one factor. See operation 104.

In the context of the present description, the lifetime of the memory may include any duration during which the memory exhibits any desired degree of usability. For example, in various embodiments, such lifetime may include, but is certainly not limited to a desired lifetime, an actual lifetime, an estimated lifetime, etc. Further, the degree of usability may refer to any usability-related parameter such as a percentage of components (e.g. blocks, cells, etc.) that are still operational, a reliability of the memory or components thereof, and/or any other parameter for that matter.

Additionally, in various embodiments, the memory may include, but is not limited to, mechanical storage devices (e.g. disk drives, etc.), solid state storage devices (e.g. dynamic random access memory (DRAM), flash memory, etc.), and/or any other storage device. In the case that the memory includes flash memory, the flash memory may include, but is not limited to, single-level cell (SLC) devices, multi-level cell (MLC) devices, NOR flash memory, NAND flash memory, MLC NAND flash memory, SLC NAND flash memory, etc. In one embodiment, the nonvolatile memory device may include at least one of a single-bit per cell NOR flash memory, a multi-bit per cell NOR flash memory, a single-bit per cell NAND flash memory, and a multi-bit per cell NAND flash memory.

Furthermore, in the context of the present description, the factor may include any factor that may affect a lifetime of memory blocks either directly, or indirectly. For example, in various embodiments the factors may include, but are not limited to, a number of errors (e.g. detected, corrected, etc.) during a read operation involving at least one of the blocks of memory, a duration between a program operation and read operation involving at least one of the blocks of memory, a number of times at least one of the blocks of memory is erased, a duration required to erase at least one of the blocks of memory, a duration required to program at least one of the blocks of memory, a number of retries required to program at least one of the blocks of memory, a number of intervening reads of a page of at least one of the blocks of memory, a number of intervening reads in a neighboring page, structure and organization of memory, and/or any other factors that meet the above definition. As an option, a history of use of the blocks of memory may be stored. In this case, the history of use may be utilized to determine the factor.

More illustrative information will now be set forth regarding various optional architectures and features with which the foregoing framework may or may not be implemented, per the desires of the user. It should be strongly noted that the following information is set forth for illustrative purposes and should not be construed as limiting in any manner. Any of the following features may be optionally incorporated with or without the exclusion of other features described.

FIG. 2 shows a technique 200 for increasing a lifetime of a plurality of blocks of memory, in accordance with another embodiment. As an option, the present technique 200 may be implemented in the context of the details of FIG. 1. Of course, however, the technique 200 may be implemented in any desired environment. It should also be noted that the aforementioned definitions may apply during the present description.

As shown, an endurance 202 of a plurality of memory blocks 204 may be monitored. In this case, the bars in FIG. 2 represent the number of writes for a particular block 204. In the context of the present description, the endurance 202 refers to the number of write and erase cycles for each memory block 204. Thus, the endurance 202 corresponds to a usage of the memory blocks 204. In one embodiment, the number of writes and/or erases may be monitored and logged.

By monitoring the number of writes of the blocks 204, it may be determined which blocks have been utilized more frequently. In one embodiment, the monitoring may be used to determine whether the number of writes for any of the blocks 204 has exceeded a threshold 206. Additionally, such monitoring may allow an equalization of the usage such that when the number of writes for certain blocks reach the threshold 206, other blocks below the threshold 206 may be utilized for writes. For example, an order on which blocks are written and recycled may be changed to minimize any difference in endurance values between blocks.

In operation, at least one factor that affects a lifetime of the plurality of blocks of memory 204 may be identified and/or monitored. A plurality of blocks to write may then be selected based on the at least one factor. In various embodiments, there may be multiple factors indicating a state of the blocks 204 from a lifetime perspective. In one embodiment, the factor may include a number of corrected errors associated with each of the blocks 204. Such corrected errors may correspond to a reading of the data, for example.

In various cases, the factor may be impacted by a plurality of other factors. For example, the number of corrected errors may be impacted by how much time has lapsed from a program operation to a read, and by how many reads were executed. Additionally, a number of times a block is erased and programmed may also impact the number of errors corrected.

Of course, many other factors may also impact the number of errors corrected. In various embodiments, the factors may correspond to a period of time of usage of the blocks 204, a frequency of writes, a rate of the operations, a total permitted number of the operations, and a duration of the lifetime, etc. Of course, such exemplary aspects are set forth for illustrative purposes only as the factor may correspond to any aspect that may affect a life expectancy of a block of memory.

In one embodiment, a score may be utilized as to determine whether to change the order of which the blocks 204 are written and recycled. For example, each block 204 may have a corresponding score function that is based on at least one factor. The score function may be utilized to determine a score for each of the blocks 204.

This score may be utilized to minimize a difference in values between score functions of the blocks 204. As an option, the score may be based on one factor that affects a lifetime of the blocks 204. As another option, the score may be based on a plurality of factors that affect a lifetime of the blocks 204.

For example, in the case of two memory blocks, one memory block may have a score over the threshold 206 and one may have a score below the threshold 206. In this case, each of the scores may correspond to at least one factor that affects the lifetime of the blocks. It should be noted that, the scores may correspond to any number of factors, as noted above.

In one embodiment, the scores may be indicative of a value corresponding to at least one factor relating to a life expectancy of the blocks. In this case, the difference in the values may reflect a difference in a lifetime expectancy of the blocks. Thus, the two blocks may be equalized.

In one embodiment, the equalization may include utilizing (e.g. writing) the block below the threshold 206 while the block that is above the threshold 206 is not utilized. This may occur until a point when the two blocks correspond to equal or near equal values. At that point, the threshold 206 may be increased and either memory block may be utilized.

Initially all blocks 204 may be below the threshold 206. When a block exceeds the threshold 206, it may be labeled, or otherwise identified as a block above the threshold 206. The blocks 204 under the threshold 206 may then be utilized until they reach or exceed the threshold 206.

This may continue until all blocks 204 below the threshold 206 are exhausted. At this point, a new threshold may be set such that all existing blocks 204 are below the new threshold. This may repeat throughout the lifetime of the blocks 204.

As an option, a count percentage of free space may be utilized during the equalization the variation between the blocks 204, in order to minimize a total amount of blocks 204 that are erased and written. Additionally, various other techniques may be utilized to minimize a total amount blocks that are erased and written in conjunction with equalizing the variation between the blocks (i.e. block reclamation). Furthermore, various other equalizing techniques may be utilized to equalize the variation between the blocks 204.

In one embodiment, multiple memory modules may be utilized in a system. In this case, the memory modules may include memory modules with different lifetimes. As such, the total memory lifetime of the system may be up to the sum of the lifetime of the memories, as opposed to being limited to a memory module with the minimum lifetime.

In one embodiment, a lifetime estimator module may serve to receive commands communicated to a controller of a system via a storage bus. The lifetime estimator module may compute an estimated lifetime assuming that the commands received through the bus were executed. In one embodiment, the lifetime estimator may be utilized to monitor the number of writes and/or other factors affecting the lifetime of the memory blocks 204. Strictly as an option, the lifetime estimator module may be utilized to set the threshold 206.

Of course, the threshold 206 may be set using a variety of techniques. In one embodiment, the threshold 206 may be a pre-determined threshold. In another embodiment, the threshold 206 may be set dynamically. As an option, the threshold may correlate directly to a lifetime (e.g. expected, desired, etc.) of a device associated with at least one of the memory blocks 206.

In one embodiment, an intra-storage device redundancy capability may be utilized for reducing cost and improving performance. In such embodiment, data may be moved between the individual storage devices, based on any factor associated with a lifetime thereof. For instance, a situation may involve a first one of the storage devices including a set of data that is more frequently overwritten with respect to the data of a second one of the storage devices. In such case, after threshold of at least one factor associated with lifetime is exceeded, such data may be moved from the first storage device to the second storage device, and henceforth the first storage device or one or more blocks/modules thereof may be used to store less-frequently written data or retired from further use.

To this end, storage device lifetime may be distributed appropriately to avoid one storage device or a portion of a storage device from failing at a point in time that is vastly premature with respect to other storage devices of the group. Of course, the present technique may be applied not only among different storage devices, but also portions thereof. To this end, the lifetime of any memory components may be managed in such a manner.

FIG. 3 shows a method 300 for increasing a lifetime of a plurality of blocks of memory, in accordance with another embodiment. As an option, the present method 300 may be implemented in the context of the functionality of FIGS. 1-2. Of course, however, the method 300 may be carried out in any desired environment. It should also be noted that the aforementioned definitions may apply during the present description.

As shown, a threshold is defined such that all blocks of memory are below the threshold. See operation 302. In one embodiment, the threshold may correspond to a usage of the blocks. For example, as blocks are used a value of usage associated with the blocks may approach the threshold. In another embodiment, the threshold may correspond to at least one other factor associated with a life expectancy of the set of blocks.

For example, the threshold may correspond to a number of corrected errors for the blocks. In this case, as blocks are used a value the number of corrected errors associated with the blocks may approach the threshold. Of course, the threshold may correspond to any number of factors affecting the lifetime of the blocks.

Once an initial threshold is identified which the blocks are below, it is determined whether a block needs to be reclaimed. See operation 304. For example, if factors indicate that a block or group of blocks is above the threshold or have been used disproportionately to other blocks, it may be determined that the block or blocks need to be reclaimed.

In the context of the present description, block reclaiming, which may be triggered by garbage collection, read disturbs, scrubbing, number of corrected errors, or other event, refers to equalizing a variation between block, based on at least one factor. For example, in various embodiments the block reclaiming may include equalizing a variation between the blocks based on a number of errors detected during a read/write, a number of errors corrected during a read/write, a length of time to erase a block, a length of time for a block to program, a number of entries utilized during programming, a number of intervening reads of a page, a number of intervening reads in a neighboring page, a number of erases and program cycles of a block, and/or any other factors.

If it is determined that a block needs to be reclaimed, blocks in a block set below the threshold are allocated to be written. See operation 306. For example, blocks below a threshold may be utilized in a memory operation as opposed to the block or blocks in a block set which is above the threshold.

Once block(s) in a block set below the threshold are allocated to be written, it is then determined whether any blocks exceed the threshold. See operation 308. For example, the blocks in the block set below the threshold may be written until it is determined that a block exceeds the threshold.

If it is determined that a block has exceeded the threshold, the block may be placed into the set of blocks corresponding to blocks over the threshold. See operation 310. If the block has not exceeded the threshold, the block may remain in the block set below the threshold and may continue to be utilized.

It is then determined whether all of the blocks below the threshold are exhausted. See operation 312. In other words, it is determined whether all blocks in the set of blocks corresponding to blocks below the threshold have been included in the set of blocks corresponding to blocks above the threshold.

If all blocks below the threshold have been exhausted, a new threshold is set and all existing blocks are defined to be below the new threshold. See operation 314. Once a new threshold has been set, it is again determined whether blocks need to be reclaimed. As an option, this may continue over the lifetime of the memory blocks.

It should be noted that the new and the initial thresholds may be set based on various criteria. For example, the threshold may be set based on an expected usage of the blocks. In one embodiment, the threshold may be a pre-determined threshold. In another embodiment, the threshold may be determined based on the memory block usage.

FIG. 4 shows a method 400 for writing data to different storage devices based on a write frequency, in accordance with one embodiment. As an option, the present method 400 may be implemented in the context of the functionality and architecture of FIGS. 1-3. Of course, however, the method 400 may be carried out in any desired environment. It should also be noted that the aforementioned definitions may apply during the present description.

As shown, a frequency in which data is written is identified. See operation 402. Additionally, a plurality of storage devices of different types are selected from to write the data, based on the frequency. See operation 404.

In one embodiment, the selection may be based on a threshold. For example, if the frequency in which data is written exceeds a threshold, a certain storage device may be selected to write the data. As an option, the different types of storage devices may include an SLC and an MLC device, an MLC and MLC with different endurance, SLC and DRAM, MLC and DRAM. Of course, in various other embodiments, the different types of storage devices may include any number of devices, including a variety of different types of memory.

In another embodiment, at least two different types of memory may be integrated in one device. For example, flash MLC and SLC memory may be combined on one device. As another example, two different types of flash MLC may be integrated in one device. In yet another example, a mix of memory types in one device may be determined programmatically. In one case, a portion of the storage device associated with SLC flash memory may be determined and a portion of the storage device associated with the MLC flash memory may be determined.

As a specific example, it may be determined that data from a particular application or program is written with a high frequency. In this case, an SLC device may be selected to write the data. On the other hand, it may be determined that data from a particular application or program, or particular location of disk, or from particular access pattern are written with a low frequency. In this case, an MLC device may be selected to write the data. Of course, this is merely an example, as any number of devices may be selected based on the identified frequency.

In one embodiment, a lifetime estimator module may serve to receive commands communicated to a controller of a system via a storage bus. The lifetime estimator module may monitor a frequency as well as computing an estimated lifetime assuming that the command(s) received through the bus was executed. Of course, the frequency may be determined in a variety of ways and is not limited to being identified by the lifetime estimator module.

It should be noted that, in various embodiments, the memory mentioned in the foregoing embodiments may include a mechanical storage device (e.g. a disk drive including a SATA disk drive, a SAS disk drive, a fiber channel disk drive, IDE disk drive, ATA disk drive, CE disk drive, USB disk drive, smart card disk drive, MMC disk drive, etc.) and/or a non-mechanical storage device (e.g. semiconductor-based, etc.). Such non-mechanical memory may, for example, include volatile or non-volatile memory. In various embodiments, the nonvolatile memory device may include flash memory (e.g. single-bit per cell NOR flash memory, multi-bit per cell NOR flash memory, single-bit per cell NAND flash memory, multi-bit per cell NAND flash memory, multi-level and/or multi-bit per cell NAND flash, large block flash memory, resistive memory, phase change memory, magnetic memory, etc). While various examples of memory are set forth herein, it should be noted that the various principles may be applied to any type of memory a lifetime for which may be reduced due to various operations being performed thereon.

FIG. 5 illustrates an exemplary system 500 in which the various architecture and/or functionality of the various previous embodiments may be implemented. For example, the exemplary system 500 may represent the computer set forth in some of the previous embodiments. Still yet, the various apparatuses set forth above may even be a component of the system 500.

As shown, a system 500 is provided including at least one host processor 501 which is connected to a communication bus 502. The system 500 also includes a main memory 504. Control logic (software) and data are stored in the main memory 504 which may take the form of random access memory (RAM).

The system 500 may also include a graphics processor 506 and a display 508, i.e. a computer monitor. The system 500 may also include a secondary storage 510. The secondary storage 510 includes, for example, a hard disk drive and/or a removable storage drive, representing a floppy disk drive, a magnetic tape drive, a compact disk drive, etc. The removable storage drive reads from and/or writes to a removable storage module in a well known manner.

Computer programs, or computer control logic algorithms, may be stored in the main memory 504 and/or the secondary storage 510. Such computer programs, when executed, enable the system 500 to perform various functions. Memory 504, storage 510 and/or any other storage are possible examples of computer-readable media.

In one embodiment, the architecture and/or functionality of the various previous figures may be implemented in the context of the host processor 501, graphics processor 506, secondary storage 510, an integrated circuit (not shown) that is capable of at least a portion of the capabilities of both the host processor 501 and the graphics processor 506, a chipset (i.e. a group of integrated circuits designed to work and be sold as a module for performing related functions, etc.), and/or any other integrated circuit for that matter.

Still yet, the architecture and/or functionality of the various previous figures may be implemented in the context of a general computer system, a circuit board system, a game console system dedicated for entertainment purposes, an application-specific system, and/or any other desired system. For example, the system 500 may take the form of a desktop computer, lap-top computer, and/or any other type of logic. Still yet, the system 500 may take the form of various other devices including, but not limited to a personal digital assistant (PDA) device, a mobile phone device, a television, etc.

Further, while not shown, the system 500 may be coupled to a network [e.g. a telecommunications network, local area network (LAN), wireless network, wide area network (WAN) such as the Internet, peer-to-peer network, cable network, etc.] for communication purposes.

While various embodiments have been described above, it should be understood that they have been presented by way of example only, and not limitation. Thus, the breadth and scope of a preferred embodiment should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents. 

1-20. (canceled)
 21. A storage system comprising: a plurality of storage devices coupled to a storage bus; and a processor communicatively coupled to the storage bus, the processor configured to identify at least one factor associated with each of the plurality of storage devices that affects a lifetime of the storage device, and move a set of data from a first storage device to a second storage device based on the at least one factor associated with the first storage device.
 22. The storage system of claim 21, wherein moving the set of data is performed when the at least one factor associated with the first storage device exceeds a threshold.
 23. The storage system of claim 22, wherein the at least one factor associated with the second storage devices does not exceed the threshold.
 24. The storage system of claim 22, wherein the processor is further configured to, upon determining that the at least one factor associated with the first storage device exceeds the threshold, store less-frequently written data on the first storage device.
 25. The storage system of claim 21, wherein the at least one factor is based on a number of erase and program cycles of blocks of memory in the storage device.
 26. The storage system of claim 25, where the processor is further configured to monitor the number of erase and program cycles of the blocks of memory of the storage device.
 27. The storage system of claim 21, wherein the at least one factor is based on a number of errors detected or corrected during a read of at least one block of memory in the storage device.
 28. The storage system of claim 21, wherein the at least one factor is based on a length of time to erase at least one block of memory in the storage device.
 29. The storage system of claim 21, wherein the at least one factor is based on a length of time to program at least one block of memory in the storage device.
 30. The storage system of claim 21, wherein the at least one factor is based on a number of retries required to program at least one block of memory in the storage device.
 31. The storage system of claim 21, wherein the identifying and moving are performed on a continuing basis in order to distribute storage device lifetime across the plurality of storage devices.
 32. A method of distributing storage device lifetime across a plurality of storage devices in a storage system, the method comprising steps of: identifying at least one factor associated with each of the plurality of storage devices that affects a lifetime of the storage device; and moving a set of data from a first storage device to a second storage device based on the at least one factor associated with the first storage device.
 33. The method of claim 32, wherein moving the set of data is performed when the at least one factor associated with the first storage device exceeds a threshold, wherein the at least one factor associated with the second storage devices does not exceed the threshold.
 34. The method claim 33, further comprising the step of, upon determining that the at least one factor associated with the first storage device exceeds the threshold, storing less-frequently written data on the first storage device.
 35. The method of claim 32, wherein the at least one factor is based on a number of erase and program cycles of blocks of memory in the storage device, the method further comprising the step of monitoring the number of erase and program cycles of the blocks of memory of the storage device.
 36. A method comprising steps of: identifying at least one factor associated with a first group of blocks of memory that affects a lifetime of the first group of blocks; determining whether the at least one factor associated with the first group of blocks exceeds a threshold; and upon determining that the at least one factor associated with the first group of blocks exceeds the threshold, moving a set of data from the first group of blocks to a second group of blocks of memory.
 37. The method claim 36, wherein the first group of blocks is located on a first storage device of a plurality of storage devices, and the second group of blocks is located on a second storage device of the plurality of storage devices.
 38. The method claim 37, wherein the threshold is correlated to a lifetime of the first storage device.
 39. The method of claim 36, the method further comprising the step of monitoring the at least one factor for each of the blocks of memory in the first group of blocks.
 40. The method of claim 39, wherein the at least one factor is based on a number of erase and program cycles of each of the blocks of memory. 